home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 43 / Amiga Format CD43 (1999)(Future Publishing)(GB)(Track 1 of 2)[!][issue 1999-09].iso / -serious- / programming / other / flexcat / lib / cat2h.readme < prev    next >
Text File  |  1999-06-14  |  2KB  |  31 lines

  1.  
  2. The files "Cat2h_c.sd" and "Cat2h_h.sd" contains source descriptors that
  3. generates code similar to the one generated by Cat2h by Nico François (and
  4. also Cat2Inc by Magnus Holmgren ;). It uses a somewhat different approach
  5. to string handling, that is small and fast.
  6.  
  7. Rather than storing all string in an array, and scan that one each time
  8. (like CatComp normally does; there are ways around that though), the first
  9. two bytes of a string contains the ID. The "GetString" function, which
  10. takes a string as argument, then only reads these two bytes into a long
  11. word, and the string ID and default string is then known.
  12.  
  13. As of version 1.9, FlexCat is capable of generating that kind of output,
  14. using the %a command. The included files actually use %2a, and thus, only
  15. two ID bytes per string are generated (like Cat2h does). This should be
  16. enough for most applications. If you change the length, remember that the
  17. GetString() function need to be changed accordingly.
  18.  
  19. The generated header file defines all strings, and the source file contains
  20. code to open/close the catalog (with autoinit code for SAS/C and DICE), and
  21. a suitable GetString function. A quick look at the generated code should be
  22. enough to gather all the details, I think.
  23.  
  24. The code does currently not support multiple catalogs, nor change of
  25. version number and builtin language.  Easy to add though (e.g.  by using
  26. %b for all names (and references) needed to be unique e.g. Get%bString() etc),
  27. should the need arise.
  28.  
  29.  
  30. Magnus Holmgren <cmh@lls.se>
  31.